/**
 * 欢迎页面
 */
package com.qianfeng.tiantian_banjia;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import android.view.Menu;
//引导页面
public class WelcomActivity extends Activity {
	ActionBar bar;
	
	private Handler handler=new Handler(){
		public void handleMessage(android.os.Message msg) {
			Intent intent=new Intent(WelcomActivity.this,MainActivity.class);
			
			
			startActivity(intent);
			WelcomActivity.this.finish();
			
		};
	};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_welcom);
		
	
		bar=getActionBar();
		bar.hide();
		ExecutorService service=Executors.newSingleThreadExecutor();
		service.execute(new Runnable() {
			
			@Override
			public void run() {
				// TODO Auto-generated method stub
				try {
					Thread.sleep(1000);
					Message message=Message.obtain();
					message.what=-1;
					handler.sendMessage(message);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		});
		//shpref.edit().putBoolean("isFirstLogin", false);
	}
	
}
